package com.bh.extend.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Dict;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.Date;

/**
 * 预派送单对象 jc_led_send
 *
 * @author slx
 * @date 2023-08-09
 */
@TableName("jc_led_send")
@ApiModel(value = "预派送单对象", description = "预派送单对象")
@EqualsAndHashCode(callSuper = true)
@Data
public class JcLedSend extends BaseEntity {
    

    /**
     * 派送单ID
     */
    @TableId(value = "send_id", type = IdType.AUTO)
    private Long sendId;


    private String sendCode;

    /**
     * 1派送、2转运
     */
    @ApiModelProperty("1派送、2转运")
    @Excel(name = "1派送、2转运")
    private String sendType;

    @Dict(dictTable = "sys_user", dictLabel = "nick_name", dictValue = "user_id", dictAlias = "preSendUserDtLabel")
    private Long preSendUser;
    @TableField(exist = false)
    private String preSendUserDtLabel;

    /**
     * 派送时间
     */
    @ApiModelProperty("派送时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "派送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date preSendTime;

    /**
     * 派送保存事件
     */
    @ApiModelProperty("派送保存事件")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "派送保存事件", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    /**
     * 派送保存状态
     */
    @ApiModelProperty("派送保存状态")
    @Excel(name = "派送保存状态")
    private String sendStatus;

    /**
     * 涉及的分段订单
     */
    @ApiModelProperty("涉及的分段订单")
    @Excel(name = "涉及的分段订单")
    @Dict(dictTable = "jc_led", dictLabel = "code", dictValue = "id", dictAlias = "ledIdsCode")
    private String ledIds;
    @TableField(exist = false)
    private String ledIdsCode;

    /**
     * 转运出发网点
     */
    @ApiModelProperty("转运出发网点")
    @Excel(name = "转运出发网点")
    private Long transFromOrg;

    /**
     * 转运到达地点
     */
    @ApiModelProperty("转运到达地点")
    @Excel(name = "转运到达地点")
    private Long transToOrg;

    /**
     * 转运出发时间
     */
    @ApiModelProperty("转运出发时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "转运出发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date transStartTime;

    /**
     * 转运到达时间
     */
    @ApiModelProperty("转运到达时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "转运到达时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date transEndTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("sendId", getSendId())
                .append("sendType", getSendType())
                .append("preSendUser", getPreSendUser())
                .append("preSendTime", getPreSendTime())
                .append("sendTime", getSendTime())
                .append("sendStatus", getSendStatus())
                .append("ledIds", getLedIds())
                .append("transFromOrg", getTransFromOrg())
                .append("transToOrg", getTransToOrg())
                .append("transStartTime", getTransStartTime())
                .append("transEndTime", getTransEndTime())
                .toString();
    }
}